"use client"; // 标记为 Client Component

export default function ProvinceButton({ province, link }) {
  const handleClick = () => {
    if (link) {
      window.location.href = link; // 跳转到指定链接
    }
  };

  return (
    <button
      className="px-4 py-0 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition-colors"
      onClick={handleClick}
    >
      {province}
    </button>
  );
}